package classes.model
{
	import com.adobe.cairngorm.model.IModelLocator;
	import mx.containers.ViewStack;
	import mx.controls.DateChooser;
	import classes.view.dynamiccalendar.view.MonthView;
	import classes.view.dynamiccalendar.form.EventForm;
	
	[Bindable]
	public class CoreModelLocator implements IModelLocator {
	
		private static var instance:CoreModelLocator;

		public function CoreModelLocator(enforcer:SingletonEnforcer) {
		if (enforcer == null) {
				throw new Error( "You Can Only Have One CoreModelLocator" );
			}
		}

		public static function getInstance() : CoreModelLocator {
			if (instance == null) {
				instance = new CoreModelLocator( new SingletonEnforcer );
			}
			return instance;
		}
		
		

		//state
		public var dCalCurrentDate:Date;

		//view
		public var dCalDtPicker:DateChooser;
		public var dCalStackViews:ViewStack;
		public var dCalMonthView:MonthView;
		
		public var dCalEventForm:EventForm;
		
		// DEFINE VIEW CONSTANTS
		// DEFINE YOUR VARIABLES HERE
		//public var workflowState:uint = 0;
		
 		//public static const LOGIN_SCREEN:uint = 0;
		//public static const WELCOME_SCREEN:uint = 1; 

	}
// Utility Class to Deny Access to Constructor
}
class SingletonEnforcer {}